import request from '@/utils/request'

// 查询告警列表
export function listWarnHistory(query) {
  return request({
    url: '/swla2/warnHis/list',
    method: 'get',
    params: query
  })
}

// 查询告警详细
export function getWarnHistory(ID) {
  return request({
    url: '/swla2/warnHis/' + ID,
    method: 'get'
  })
}

// 新增告警
export function addWarnHistory(data) {
  return request({
    url: '/swla2/warnHis',
    method: 'post',
    data: data
  })
}

// 修改告警
export function updateWarnHistory(data) {
  return request({
    url: '/swla2/warnHis',
    method: 'put',
    data: data
  })
}

// 删除告警
export function delWarnHistory(ID) {
  return request({
    url: '/swla2/warnHis/' + ID,
    method: 'delete'
  })
}
